<!--
 * @Author: your name
 * @Date: 2021-06-14 10:13:40
 * @LastEditTime: 2021-06-26 15:39:44
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \hairdressing_web\src\pages\sales\StatusSlip.vue
-->
<template>
  <view>
    <u-popup v-model="show" mode="bottom" length="53%" border-radius="30" :closeable="true">
      <view class="box">
        <view class="title">货物状态</view>
        <view class="content">
          <u-radio-group v-model="value" active-color="#FF5400" icon-size="30">
            <view class="c-flex c-flex-between">
              <view>未收到货</view>
              <u-radio name="0" :disabled="false"> </u-radio>
            </view>
            <view class="c-flex c-flex-between">
              <view>已收到货</view>
              <u-radio name="1" :disabled="false"> </u-radio>
            </view>
          </u-radio-group>
        </view>
        <SaveButton text="确定" @navTo="save" />
      </view>
    </u-popup>
  </view>
</template>
<script>
import SaveButton from '@/commponents/public/button/SaveButton'
export default {
  components: {
    SaveButton
  },
  data() {
    return {
      show: false,
      value: ''
    }
  },
  methods: {
    openSlip() {
      this.show = true
    },
    save() {
      this.$emit('status', this.filterStatus(this.value))
      this.show = false
    },
    filterStatus(val){
      if(val == 0){
        return '未收到货'
      }else if(val == 1){
        return '已收到货'
      }
    }
  }
}
</script>

<style lang="scss" scoped>
.c-flex {
  display: flex;
}
.c-flex-between {
  justify-content: space-between;
}
.box {
  height: 100%;
  width: 100%;
  box-sizing: border-box;
  padding-top: 80rpx;
}
.title {
  text-align: center;
  font-size: 34rpx;
  font-family: PingFang SC;
  font-weight: 600;
  color: #303030;
}
.content {
  padding: 0 60rpx;
  font-weight: 500;
  font-family: PingFang SC;
  color: #303030;
  font-size: 29rpx;
  .c-flex {
    margin-top: 60rpx;
  }
}
</style>